﻿using System.Web.Mvc;
using Newtonsoft.Json;

namespace Gueei.Gallery.Web.Views
{
	// Render result in json string.
	// Need to change the content type later. 
	public class JsonView: IView
	{
		public void Render(ViewContext viewContext, System.IO.TextWriter writer)
		{
			var serializer = new JsonSerializer();
			serializer.Serialize(writer, viewContext.ViewData.Model);
		}
	}
}